<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	 <!--1.   1-100之间偶数相加，求加到几的时候和超过1000：**-->   
	 <script type="text/javascript">
        var a =1;
        var sum=0;
        while(a<=100) {
            if(a%2!=0){
                a++;
                continue;
            }
           else{ 
            sum+=a;
            a++
        } 
        if(sum>1000) {
            console.log(a);
        }                
        }
        console.log(sum);
    </script>
 <!--2.   1-100之间偶数相加，能被7整除的数字不参加累加运算，求和-->   
 <script type="text/javascript">
    var a =1;
    var sum =0;
        while(a<=100){
            if(a%2==0){
                sum+=a;
                a++;
            }else if(a%7==0){
                a++;
                continue;
            }else{ 
                sum+=a;
                a++;
            }         
        }
        console.log(sum);
 </script>
  <!--3.   求199-2022的润年-->  
  <script src="text/javascript">
    for (var i = 199; i <=2022; i++) {
       if(i%4==0) {
        console.log(i);
       }    
    }
  </script>

 <!--4. 输入分数，如果分数在  90-100: A  80-89：B     60-79：C      小于60：D
        考虑分数不合法--> 
    <script type="text/javascript">
       var score= prompt('请输入分数')
       switch (score) {
        case 'score>=90 && score=100':
             alert("A")
            break;
        case 'score>=80 && score<=89':
             alert('B')
             break;
        case 'score>=60 && score<=79':
             alert('C')
             break;
        case 'score<60':
              alert('D')
              break;
        default:
            break;
       }
    </script>
</body>
</html>